/**
 * Created with JetBrains WebStorm.
 * User: thaidoanhong
 * Date: 3/25/13
 * Time: 9:37 PM
 * To change this template use File | Settings | File Templates.
 */
var MyAttribute = Class.create({
    initialize: function(o){// truyen object chua cac thong tin ve type,name,value,id
        this.type = o.type;
        this.key = o.key;
        this.name = o.name;
        this.value = o.value;
    },
    toDataObject: function(isExport){
        var o = new Object();
        o['type'] = this.type;
        o['key'] = this.key;
        o['name'] = this.name;
        if((this.type == "image" || this.type == "video" || this.type == "audio") && isExport){
            o['value'] = this.value.replace(Static.uploaderPath, "");
        }
        else{
            o['value'] = this.value;
        }


        return o;
    }
})